//
//  ZallFilterTableView.h
//  ZJS-DRIVER
//
//  Created by zxx on 2017/3/30.
//  Copyright © 2017年 zall. All rights reserved.
//

#import <UIKit/UIKit.h>

/**
 *  筛选选中回调block
 *  selectButtonIndex 筛选选项index
 *  selectedFilterRowIndex 筛选下拉index
 *  selectedFilterRowValue 筛选下拉选中value
 */
typedef void(^DriverRecruitFilterBlock)(NSInteger selectButtonIndex, NSInteger selectedFilterRowIndex, NSString *selectedFilterRowValue);
/**
 *  筛选按钮点击回调block
 *  筛选按钮点击后会隐藏筛选视图
 *  isFold  YES折叠 NO展开
 */
typedef void(^FilterButtonClickBlock)(NSInteger buttonIndex,BOOL isFold);

/**
 *  @brief  筛选视图
 */
@interface ZallFilterTableView : UIView

/**
 *  筛选视图dataSource
 *  dataSourceArr元素为NSDictionary,NSDictionary<key,value>类型为title:NSString,dataSource:NSArray
 *  例如：@[@{@"title":@"装货区域",@"dataSource":@[@{@"title":@"00:00-05:59",@"value":@"00:00-05:59"},@{@"title":@"06:00-11:59",@"value":@"06:00-11:59"},@{@"title":@"12:00-17:59",@"value":@"12:00-17:59"},@{@"title":@"18:00-23:59",@"value":@"18:00-23:59"}]}]
 */
@property(strong, nonatomic) NSArray<NSDictionary *> *dataSourceArr;

/**
 *  设置第dataSourceIndex的内容
 */
- (void)setData:(NSDictionary *)data dataSourceIndex:(NSUInteger)dataSourceIndex;

/**
 *  筛选点击按钮的高度
 */
@property(assign, nonatomic) CGFloat filterButtonHeight;
/**
 *  tableViewSize传入tableView的宽高
 */
@property(assign, nonatomic) CGSize tableViewSize;
@property(copy, nonatomic) DriverRecruitFilterBlock filterBlock;
@property(copy, nonatomic) FilterButtonClickBlock filterButtonClickBlock;
/**
 *  折叠筛选选择视图
 */
- (void)floldFilterTableView;

/**
 *  设置第index个按钮的文案
 */
- (void)setButtonText:(NSString *)text index:(NSUInteger)index;

/**
 *  获取第index个按钮的文案
 */
- (NSString *)getButtonTextWithIndex:(NSUInteger)index;

@end
